package com.imut.service.impl;

import com.imut.mapper.AccountMapper;
import com.imut.entity.Account;
import com.imut.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountMapper accountMapper;


    @Override
    public boolean insertAll(Account account) {
        accountMapper.insertAll(account);
        return true;
    }

    @Override
    public boolean updateById(Account account) {
        accountMapper.updateById(account);
        return true;
    }

    @Override
    public boolean deleteById(Integer id) {
        accountMapper.deleteById(id);
        return true;
    }

    @Override
    public Account selectById(Integer id) {
        return accountMapper.selectById(id);
    }

    @Override
    public List<Account> selectAll() {
        return accountMapper.selectAll();
    }
}
